﻿using System;
using System.Windows.Forms;

namespace LeakView.view
{
    public partial class FormConfig : Form
    {
        public FormConfig()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Properties.Settings.Default.ui_misc = comboBox1.SelectedIndex == 0;
            Properties.Settings.Default.ui_view = comboBox2.SelectedIndex;
            Properties.Settings.Default.Save();
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
        }

        private void FormConfig_Load(object sender, EventArgs e)
        {
            this.comboBox1.SelectedIndex = Properties.Settings.Default.ui_misc ? 0 : 1;
            this.comboBox2.SelectedIndex = Properties.Settings.Default.ui_view;
        }

    }
}
